<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class OrgTeam extends Model
{
	use HasDateTimeFormatter;
    use SoftDeletes;

    protected $table = 'org_team';

    protected $primaryKey = 'team_id';

    public function owners()
    {
        return $this->hasMany(OrgTeamOwner::class, 'team_id', 'team_id');
    }

    public function department()
    {
        return $this->hasOne(OrgDepartment::class, 'department_id', 'department_id');
    }
}
